Skip to content

Excluded unsupported Hyper-v modules in hv_modules tests for CVMs.#4512

Merged
SRIKKANTH merged 1 commit into
mainfrom
smyakam/hyperv_cvm
Jun 9, 2026
Merged

Excluded unsupported Hyper-v modules in hv_modules tests for CVMs.#4512
SRIKKANTH merged 1 commit into
mainfrom
smyakam/hyperv_cvm

Conversation

@SRIKKANTH

@SRIKKANTH SRIKKANTH commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

CVMs do not surface emulated input devices or framebuffer/DRM over VMBus, so the corresponding kernel modules are intentionally absent in CVMs. Reference: https://elixir.bootlin.com/linux/v7.0/source/drivers/hv/channel_mgmt.c#L31 In the above file only modules with ".allowed_in_isolated = true," are available in CVMs. Below are modules that are not exposed to a guest when running as a Confidential VM.

  • hid_hyperv
  • hyperv_keyboard
  • hyperv_fb
  • hyperv_drm

These modules should be skipped in checks for module presence and in reload tests on CVMs.

Description

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update

Checklist

  • Description is filled in above
  • No credentials, secrets, or internal details are included
  • Peer review requested (if not, add required peer reviewers after raising PR)
  • Tests executed and results posted below

Test Validation

Key Test Cases:

Impacted LISA Features:

Tested Azure Marketplace Images:

  • Canonical 0001-com-ubuntu-confidential-vm-focal 20_04-lts-cvm latest

Test Results

Image VM Size Result
Canonical 0001-com-ubuntu-confidential-vm-focal 20_04-lts-cvm latest Standard_DC8as_v6 PASSED

CVMs do not surface emulated input devices or framebuffer/DRM over VMBus, so the corresponding kernel modules are intentionally absent in CVMs.
Reference: https://elixir.bootlin.com/linux/v7.0/source/drivers/hv/channel_mgmt.c#L31
In the above file only modules with ".allowed_in_isolated = true," are available in CVMs.
Below are modules that are not exposed to a guest when running as a Confidential VM.
- hid_hyperv
- hyperv_keyboard
- hyperv_fb
- hyperv_drm

These modules should be skipped in checks for module presence and in reload tests on CVMs.
Copilot AI review requested due to automatic review settings June 2, 2026 07:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the Hyper-V kernel module validation tests to account for Confidential VMs (CVMs), where certain host-emulated input/display VMBus devices (and corresponding kernel modules) are intentionally unavailable.

Changes:

  • Add a CVM-unavailable module allowlist and skip those modules in initrd/module-presence checks and reload tests.
  • Introduce a reusable is_cvm() helper in lisa/features/security_profile.py to detect confidential VMs from the SecurityProfile feature.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
lisa/microsoft/testsuites/core/hv_module.py Skips input/display-related Hyper-V modules for CVMs in presence/initrd/reload checks.
lisa/features/security_profile.py Adds is_cvm() helper to detect Confidential VM security profile on a node.

Comment thread lisa/features/security_profile.py
Comment thread lisa/microsoft/testsuites/core/hv_module.py
Comment thread lisa/microsoft/testsuites/core/hv_module.py
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

✅ AI Test Selection — PASSED

3 test case(s) selected (view run)

Marketplace image: redhat rhel 9_5 latest

Count
✅ Passed 3
❌ Failed 0
⏭️ Skipped 0
Total 3
Test case details
Test Case Status Time (s) Message
verify_hyperv_modules (lisa_0_1) ✅ PASSED 15.932
verify_initrd_modules (lisa_0_0) ✅ PASSED 22.966
verify_reload_hyperv_modules (lisa_0_2) ✅ PASSED 262.041

@SRIKKANTH SRIKKANTH merged commit 94a82b3 into main Jun 9, 2026
62 checks passed
@SRIKKANTH SRIKKANTH deleted the smyakam/hyperv_cvm branch June 9, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants